#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Final HF energy',
      rel_tolerance = 1.0e-10)

f.add(re = '[XYZ]DIPLEN * [XYZ]DIPLEN * PSO 00[123456]',
      abs_tolerance = 1.0e-4)

f.add(re = ' Atom\(C \)',
      abs_tolerance = 1.0e-3)

f.add(re = ' Atom\(H1\)',
      abs_tolerance = 1.0e-3)

test.run(['rsp_cpp_nscd.dal'], ['CH4_nosym.mol'], f={'out': f})

sys.exit(test.return_code)
